-- GENERATED SPELL FOR [Skra'gath] --


function spell0_18401(pUnit, Event) --@Damage Reduction: Arcane,Self--
pUnit:FullCastSpellOnTarget(34331,pUnit)
pUnit:RegisterEvent('Sorts_18401', 542, 1)
end

function spell1_18401(pUnit, Event) --@Damage Reduction: Fire,Self--
pUnit:FullCastSpellOnTarget(34333,pUnit)
pUnit:RegisterEvent('Sorts_18401', 581, 1)
end

function spell2_18401(pUnit, Event) --@Damage Reduction: Frost,Self--
pUnit:FullCastSpellOnTarget(34334,pUnit)
pUnit:RegisterEvent('Sorts_18401', 576, 1)
end

function spell3_18401(pUnit, Event) --@Damage Reduction: Holy,Self--
pUnit:FullCastSpellOnTarget(34336,pUnit)
pUnit:RegisterEvent('Sorts_18401', 578, 1)
end

function spell4_18401(pUnit, Event) --@Damage Reduction: Nature,Self--
pUnit:FullCastSpellOnTarget(34335,pUnit)
pUnit:RegisterEvent('Sorts_18401', 589, 1)
end

function spell5_18401(pUnit, Event) --@Damage Reduction: Shadow,Self--
pUnit:FullCastSpellOnTarget(34338,pUnit)
pUnit:RegisterEvent('Sorts_18401', 566, 1)
end

function spell6_18401(pUnit, Event) --@Dark Shriek,Self--
pUnit:FullCastSpellOnTarget(32322,pUnit)
pUnit:RegisterEvent('Sorts_18401', 4277, 1)
end

function spell7_18401(pUnit, Event) --@Draining Touch,n/a--
pUnit:FullCastSpellOnTarget(29299,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_18401', 585, 1)
end

function spell8_18401(pUnit, Event) --@Piercing Shadow,n/a--
pUnit:FullCastSpellOnTarget(16429,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_18401', 2000, 1)
end

function spell9_18401(pUnit, Event) --@Shadow Burst,n/a--
pUnit:FullCastSpellOnTarget(32324,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_18401', 681, 1)
end

function Sorts_18401(pUnit, Event)
local choix_sorts_18401 = math.random(0, 9)
if choix_sorts_18401 == 0 then
pUnit:RegisterEvent('spell0_18401', 1, 1)
end
if choix_sorts_18401 == 1 then
pUnit:RegisterEvent('spell1_18401', 1, 1)
end
if choix_sorts_18401 == 2 then
pUnit:RegisterEvent('spell2_18401', 1, 1)
end
if choix_sorts_18401 == 3 then
pUnit:RegisterEvent('spell3_18401', 1, 1)
end
if choix_sorts_18401 == 4 then
pUnit:RegisterEvent('spell4_18401', 1, 1)
end
if choix_sorts_18401 == 5 then
pUnit:RegisterEvent('spell5_18401', 1, 1)
end
if choix_sorts_18401 == 6 then
pUnit:RegisterEvent('spell6_18401', 1, 1)
end
if choix_sorts_18401 == 7 then
pUnit:RegisterEvent('spell7_18401', 1, 1)
end
if choix_sorts_18401 == 8 then
pUnit:RegisterEvent('spell8_18401', 1, 1)
end
if choix_sorts_18401 == 9 then
pUnit:RegisterEvent('spell9_18401', 1, 1)
end
end

function mob18401_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_18401', math.random(1500, 3000), 1)
end

function mob18401_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob18401_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob18401_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(18401, 1, 'mob18401_Action')
RegisterUnitEvent(18401, 2, 'mob18401_Leave')
RegisterUnitEvent(18401, 3, 'mob18401_Kill')
RegisterUnitEvent(18401, 4, 'mob18401_Die')
